package com.ruoyi.dispatch.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dispatch.mapper.DrivingTeamMapper;
import com.ruoyi.dispatch.domain.DrivingTeam;
import com.ruoyi.dispatch.service.IDrivingTeamService;

/**
 * 开掘队信息Service业务层处理
 * 
 * @author wuxiaofang
 * @date 2025-04-08
 */
@Service
public class DrivingTeamServiceImpl implements IDrivingTeamService 
{
    @Autowired
    private DrivingTeamMapper drivingTeamMapper;

    /**
     * 查询开掘队信息
     * 
     * @param drivingTeamId 开掘队信息主键
     * @return 开掘队信息
     */
    @Override
    public DrivingTeam selectDrivingTeamByDrivingTeamId(Long drivingTeamId)
    {
        return drivingTeamMapper.selectDrivingTeamByDrivingTeamId(drivingTeamId);
    }

    /**
     * 查询开掘队信息列表
     * 
     * @param drivingTeam 开掘队信息
     * @return 开掘队信息
     */
    @Override
    public List<DrivingTeam> selectDrivingTeamList(DrivingTeam drivingTeam)
    {
        return drivingTeamMapper.selectDrivingTeamList(drivingTeam);
    }

    /**
     * 新增开掘队信息
     * 
     * @param drivingTeam 开掘队信息
     * @return 结果
     */
    @Override
    public int insertDrivingTeam(DrivingTeam drivingTeam)
    {
        drivingTeam.setCreateTime(DateUtils.getNowDate());
        return drivingTeamMapper.insertDrivingTeam(drivingTeam);
    }

    /**
     * 修改开掘队信息
     * 
     * @param drivingTeam 开掘队信息
     * @return 结果
     */
    @Override
    public int updateDrivingTeam(DrivingTeam drivingTeam)
    {
        drivingTeam.setUpdateTime(DateUtils.getNowDate());
        return drivingTeamMapper.updateDrivingTeam(drivingTeam);
    }

    /**
     * 批量删除开掘队信息
     * 
     * @param drivingTeamIds 需要删除的开掘队信息主键
     * @return 结果
     */
    @Override
    public int deleteDrivingTeamByDrivingTeamIds(Long[] drivingTeamIds)
    {
        return drivingTeamMapper.deleteDrivingTeamByDrivingTeamIds(drivingTeamIds);
    }

    /**
     * 删除开掘队信息信息
     * 
     * @param drivingTeamId 开掘队信息主键
     * @return 结果
     */
    @Override
    public int deleteDrivingTeamByDrivingTeamId(Long drivingTeamId)
    {
        return drivingTeamMapper.deleteDrivingTeamByDrivingTeamId(drivingTeamId);
    }
}
